home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-02 / boi120p.zip / UNITS.ZIP / IOSUPP.PAS < prev    next >
Pascal/Delphi Source File  |  1990-11-04  |  1KB  |  51 lines

  1. {$D-}
  2. {$S-}
  3. {$V-}
  4.  
  5. Unit IOSupp;
  6.  
  7.  
  8. INTERFACE
  9.  
  10. Procedure CHECKSECONDKEY(var cskey : char);
  11.  
  12. IMPLEMENTATION
  13.  
  14. Uses
  15.   BOIDecl,
  16.   Async,
  17.   IOLib;
  18.  
  19. Const
  20.   null = #$00;
  21.   F9   = #$43;
  22.   F10  = #$44;
  23.  
  24. Procedure CHECKSECONDKEY(var cskey : char);
  25.   { this procedure Aborts the program if F-10 is pressed from the
  26.     local keyboard }
  27.   var cloop : byte;
  28.  
  29.   begin {* CheckSecondKey *}
  30.     if cskey = f9 then
  31.       begin
  32.         for cloop := 1 to random(15) + 8 do SendString(chr(random(222)+33),false);
  33.         SendString(#7,false);
  34.         DropCarrier;
  35.         EndPort;
  36.         Halt
  37.       end
  38.     else if cskey = f10 then
  39.       begin
  40.         PortWindow(1,1,80,pagelength);
  41.         ClrPortScr;
  42.         SendString('The SysOp has terminated this program.',true);
  43.         SendString('Please standby as control returns to the BBS.',false);
  44.         EndPort;
  45.         Halt
  46.       end
  47.     else cskey := null;
  48.     setfunction := false;
  49.   end;  {* CheckSecondKey *}
  50.  
  51. end. Unit